package com.sy.olddriver.dao.impl;

import com.sy.olddriver.dao.CategoryDao;
import com.sy.olddriver.entity.Category;
import com.sy.olddriver.utils.JdbcHelper;

import java.util.List;

/**
 * CategoryDao接口的实现类
 *
 * @author Administrator
 */
public class CategoryDaoImpl implements CategoryDao {
    @Override
    public List<Category> getCategoriesByParentId(Integer parentId) {
        return JdbcHelper.queryForBeanList("select * from category where parentid=?", Category.class, parentId);
    }
}
